<template>
  <div class="">
    <el-container class="lay-contianer">
      <el-container>
        <el-aside width="200px">
          <!-- 左侧导航栏内容 -->
          <!-- <el-col>
            <el-menu
              default-active="4"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
              background-color="#545c64"
              text-color="#fff"
              active-text-color="#ffd04b"
            >
              <el-submenu index="1">
                <template slot="title">
                  <i class="el-icon-location"></i>
                  <span>名厨推荐</span>
                </template>
                <el-menu-item-group>
                  <template slot="title">菜系一</template>
                  <el-menu-item index="1-1">名厨推荐1</el-menu-item>
                  <el-menu-item index="1-2">名厨推荐2</el-menu-item>
                </el-menu-item-group>
                <el-menu-item-group title="菜系二">
                  <el-menu-item index="1-3">名厨推荐3</el-menu-item>
                </el-menu-item-group>
                <el-submenu index="1-4">
                  <template slot="title">菜系四</template>
                  <el-menu-item index="1-4-1">名厨推荐4</el-menu-item>
                  <el-menu-item index="1-4-1">名厨推荐4</el-menu-item>
                  <el-menu-item index="1-4-1">名厨推荐4</el-menu-item>
                </el-submenu>
              </el-submenu>
              <el-menu-item index="2">
                <i class="el-icon-menu"></i>
                <span slot="title">导航二</span>
              </el-menu-item>
              <el-menu-item index="3" disabled>
                <i class="el-icon-document"></i>
                <span slot="title">导航三</span>
              </el-menu-item>
              <el-menu-item index="4">
                <i class="el-icon-setting"></i>
                <span slot="title">导航四</span>
              </el-menu-item>
            </el-menu>
          </el-col> -->
          <el-menu
            :default-active="this.$route.path"
            class="el-menu-demo"
            mode="horizontal"
            router
            @select="handleSelect"
          >
            <el-menu-item
              v-for="(item, i) in navList"
              :key="i"
              :index="item.name"
            >
              <template slot="title">
                <i class="el-icon-s-platform"></i>
                <span> {{ item.navItem }}</span>
              </template>
            </el-menu-item>
          </el-menu>
          ————————————————
          版权声明：本文为CSDN博主「前端圆圆」的原创文章，遵循CC 4.0
          BY-SA版权协议，转载请附上原文出处链接及本声明。
          原文链接：https://blog.csdn.net/weixin_45844049/article/details/113984609
          左侧内容
        </el-aside>
        <el-main>中间内容</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: '',
  data () {
    return {
      // routers: this.$router.option.router
    }
  },
  created () {},
  methods: {
    handleOpen (key, keyPath) {
      console.log(key, keyPath)
    },
    handleClose (key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style scoped lang="less">
.lay-contianer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.el-aside {
  //   background-color: #d3dce6;
  background-color: #b3c0d1;
  color: #333;
  //   text-align: center;
  line-height: 200px;
}

.el-main {
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  line-height: 160px;
}
</style>
